﻿using System;
using System.Collections.Generic;
using System.Text;

namespace UtilZ.Dotnet.Ex.Model
{
    /// <summary>
    /// 选中项显示基类
    /// </summary>
    public abstract class CheckItemShowAbs : NotifyPropertyChangedAbs, ICheckItemShow
    {
        private string _text = null;
        /// <summary>
        /// 显示文本
        /// </summary>
        public virtual string Text
        {
            get { return _text; }
            set
            {
                _text = value;
                base.OnRaisePropertyChanged(nameof(Text));
            }
        }

        private string _imageFilePath = null;
        /// <summary>
        /// 图片路径
        /// </summary>
        public virtual string ImageFilePath
        {
            get { return _imageFilePath; }
            set
            {
                _imageFilePath = value;
                base.OnRaisePropertyChanged(nameof(ImageFilePath));
            }
        }





        /// <summary>
        /// 构造函数初始化
        /// </summary>
        public CheckItemShowAbs()
            : base()
        {

        }

        /// <summary>
        /// 构造函数初始化
        /// </summary>
        /// <param name="text">显示文本</param>
        public CheckItemShowAbs(string text)
            : base()
        {
            this._text = text;
        }

        /// <summary>
        /// 构造函数初始化
        /// </summary>
        /// <param name="text">显示文本</param>
        /// <param name="imageFilePath">图片路径</param>
        public CheckItemShowAbs(string text, string imageFilePath)
            : base()
        {
            this._text = text;
            this._imageFilePath = imageFilePath;
        }

        /// <summary>
        /// 重写ToString
        /// </summary>
        /// <returns></returns>
        public override string ToString()
        {
            return this._text;
        }
    }
}
